#include "head.h"
int coin = 0, life = 10, key, padlock, nowx, nowy, tot_steps, map[MAXX][MAXX];
char name[][10] = {"grass",    "flower",  "tree", "rock",    "key",
                   "goldcoin", "padlock", "trap", "monster", "X"};
int color[] = {2, 9, 9, 9, 6, 6, 6, 13, 13, 7};
int head = 0, tail = 1, queuex[MAXX * MAXX], queuey[MAXX * MAXX],
    record[MAXX][MAXX], path[MAXX * MAXX], p = 0, bucket[11];
int movex[] = {0, 0, 0, 1, -1};
int movey[] = {0, 1, -1, 0, 0};
int movexx[128] = {0, 0, 0, 0, -1, 0, 1, 0, 0, 0};
int moveyy[128] = {0, 0, -1, 0, 0, 0, 0, 0, 1, 0};
int move_num[5] = {0, 8, 2, 6, 4};
int flag = 1, needcls = 1, visible[MAXX][MAXX], vis[MAXX][MAXX];
